package com.mode.mvvm.bean;

import androidx.databinding.ObservableField;

/**
 * 单向绑定(数据改变时同时使视图刷新)
 * 继承BaseObservable/ObservableField
 **/
public class User {

    public ObservableField<String> name = new ObservableField<>();
    public ObservableField<Integer> age = new ObservableField<>();

    public User(String name, int age) {
        this.name = new ObservableField<>(name);
        this.age = new ObservableField<>(age);
    }
}
